<%@ Page Language="C#" MasterPageFile="~/GUIMaster.Master" AutoEventWireup="true"
    CodeBehind="EditProfile.aspx.cs" Inherits="GUI.EditProfile" Culture="auto:en-GB"
    UICulture="auto:en-GB" meta:resourcekey="PageResource1" EnableTheming="true" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../master/resourcesNew/style.css" rel="stylesheet" type="text/css" />
    <%--Redefines calendar control css just for this page--%>
    <style type="text/css">
        .ajax__calendar_container
        {
            background-color: Gray;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHomePage" runat="server">
    <h1>
        <asp:Label ID="Label_UserProfile" meta:resourcekey="lblUserProfile" runat="server"></asp:Label>
        <asp:Label ID="Label_UserNick" runat="server" meta:resourcekey="Label_UserNickResource1"></asp:Label>
    </h1>
    <div id="content_edit_profile">
        <%--We are temporary using Tables, 
        next version of EditProfile.aspx will use W3C Box Model
        --%>
        <div id="details_high" runat="server">
            <asp:Table runat="server" CssClass="EditProfileForm" meta:resourcekey="TableResource1">
                <asp:TableRow meta:resourcekey="TableRowResource1">
                    <asp:TableCell meta:resourcekey="TableCellResource1">
                        <asp:Label ID="Label_GenderT" meta:resourcekey="lblGender" runat="server" CssClass="label_title"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource2">
                        <asp:RadioButton ID="RadioButton_Male" meta:resourcekey="radioButtonMale" runat="server"
                            GroupName="Gender" />
                        <asp:RadioButton ID="RadioButton_Female" meta:resourcekey="radioButtonFemale" runat="server"
                            GroupName="Gender" />
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource3">
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource4">
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow meta:resourcekey="TableRowResource2">
                    <asp:TableCell meta:resourcekey="TableCellResource5">
                        <asp:Label ID="Label_SmokerT" meta:resourcekey="lblSmoker" runat="server" CssClass="label_title"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource6">
                        <asp:RadioButton ID="RadioButton_Smoker_Yes" meta:resourcekey="radioButtonSmokerYes"
                            runat="server" GroupName="Smoker" />
                        <asp:RadioButton ID="RadioButton_Smoker_No" meta:resourcekey="radioButtonSmokerNo"
                            runat="server" GroupName="Smoker" />
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource7">
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource8">
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
        </div>
        <div id="details_medium">
            <asp:Table runat="server" meta:resourcekey="TableResource2">
                <asp:TableRow meta:resourcekey="TableRowResource3">
                    <asp:TableCell meta:resourcekey="TableCellResource9">
                        <asp:Label ID="Label_BirthdayT" meta:resourcekey="lblBirthday" runat="server" CssClass="label_title"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource10">
                        <asp:TextBox ID="Txt_Birthday" runat="server" meta:resourcekey="Txt_BirthdayResource1"></asp:TextBox>
                        <cc1:CalendarExtender ID="Txt_Birthday_CalendarExtender" runat="server" Enabled="True"
                            TargetControlID="Txt_Birthday" CssClass="label_title" PopupPosition="Right">
                        </cc1:CalendarExtender>
                        <cc1:MaskedEditExtender ID="BirthDayMaskedEditExtender" runat="server" TargetControlID="Txt_Birthday"
                            Mask="99/99/9999" MaskType="Date" OnFocusCssClass=""  OnInvalidCssClass="">
                        </cc1:MaskedEditExtender>
                        <cc1:MaskedEditValidator ID="MaskedEditValidator1" meta:resourcekey="validatorLblBirthDay"
                            ControlExtender="BirthDayMaskedEditExtender" ControlToValidate="Txt_Birthday"
                            IsValidEmpty="true" MaximumValue="1/1/2050" MinimumValue="1/1/1900" Display="Dynamic"
                            runat="server"></cc1:MaskedEditValidator>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource11">
                        <asp:Label ID="Label3" meta:resourcekey="lblPrivacyLevel" runat="server" CssClass="label_title privacyLabel"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource12">
                        <asp:DropDownList ID="DropDownListBirthDay" runat="server" CssClass="privacyLabel"
                            meta:resourcekey="DropDownListBirthDayResource1">
                            <asp:ListItem Value="3" meta:resourcekey="dropDownListPrivacyAll">
                            </asp:ListItem>
                            <asp:ListItem Value="2" meta:resourcekey="dropDownListPrivacyTripBuddies"></asp:ListItem>
                            <asp:ListItem Value="1" meta:resourcekey="dropDownListPrivacyBuddies"></asp:ListItem>
                            <asp:ListItem Value="0" meta:resourcekey="dropDownListPrivacyNobody"></asp:ListItem>
                        </asp:DropDownList>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow meta:resourcekey="TableRowResource4">
                    <asp:TableCell meta:resourcekey="TableCellResource13">
                        <asp:Label ID="Label_CityT" meta:resourcekey="lblCity" runat="server" CssClass="label_title"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource14">
                        <asp:TextBox ID="Txt_City" runat="server" meta:resourcekey="Txt_CityResource1" CssClass="txtBox_generics"></asp:TextBox>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource15">
                        <asp:Label ID="Label4" meta:resourcekey="lblPrivacyLevel" runat="server" CssClass="label_title privacyLabel"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource16">
                        <asp:DropDownList ID="DropDownListPrivacyCity" runat="server" CssClass="privacyLabel"
                            meta:resourcekey="DropDownListPrivacyCityResource1">
                            <asp:ListItem Value="3" meta:resourcekey="dropDownListPrivacyAll">
                            </asp:ListItem>
                            <asp:ListItem Value="2" meta:resourcekey="dropDownListPrivacyTripBuddies"></asp:ListItem>
                            <asp:ListItem Value="1" meta:resourcekey="dropDownListPrivacyBuddies"></asp:ListItem>
                            <asp:ListItem Value="0" meta:resourcekey="dropDownListPrivacyNobody"></asp:ListItem>
                        </asp:DropDownList>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow meta:resourcekey="TableRowResource5">
                    <asp:TableCell meta:resourcekey="TableCellResource17">
                        <asp:Label ID="Label_AddressT" meta:resourcekey="lblAddress" runat="server" CssClass="label_title"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource18">
                        <asp:TextBox ID="Txt_Address" runat="server" meta:resourcekey="Txt_AddressResource1"
                            CssClass="txtBox_generics"></asp:TextBox>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource19">
                        <asp:Label ID="Label5" meta:resourcekey="lblPrivacyLevel" runat="server" CssClass="label_title privacyLabel"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource20">
                        <asp:DropDownList ID="DropDownListPrivacyAddress" runat="server" CssClass="privacyLabel"
                            meta:resourcekey="DropDownListPrivacyAddressResource1">
                            <asp:ListItem Value="3" meta:resourcekey="dropDownListPrivacyAll">
                            </asp:ListItem>
                            <asp:ListItem Value="2" meta:resourcekey="dropDownListPrivacyTripBuddies"></asp:ListItem>
                            <asp:ListItem Value="1" meta:resourcekey="dropDownListPrivacyBuddies"></asp:ListItem>
                            <asp:ListItem Value="0" meta:resourcekey="dropDownListPrivacyNobody"></asp:ListItem>
                        </asp:DropDownList>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow meta:resourcekey="TableRowResource6">
                    <asp:TableCell meta:resourcekey="TableCellResource21">
                        <asp:Label ID="Label_Name" meta:resourcekey="lblName" runat="server" CssClass="label_title"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource22">
                        <asp:TextBox ID="Txt_Name" runat="server" meta:resourcekey="Txt_NameResource1" CssClass="txtBox_generics"></asp:TextBox>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource23">
                        <asp:Label ID="Label6" meta:resourcekey="lblPrivacyLevel" runat="server" CssClass="label_title privacyLabel"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource24">
                        <asp:DropDownList ID="DropDownListPrivacyName" runat="server" CssClass="privacyLabel"
                            meta:resourcekey="DropDownListPrivacyNameResource1">
                            <asp:ListItem Value="3" meta:resourcekey="dropDownListPrivacyAll">
                            </asp:ListItem>
                            <asp:ListItem Value="2" meta:resourcekey="dropDownListPrivacyTripBuddies"></asp:ListItem>
                            <asp:ListItem Value="1" meta:resourcekey="dropDownListPrivacyBuddies"></asp:ListItem>
                            <asp:ListItem Value="0" meta:resourcekey="dropDownListPrivacyNobody"></asp:ListItem>
                        </asp:DropDownList>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow meta:resourcekey="TableRowResource7">
                    <asp:TableCell meta:resourcekey="TableCellResource25">
                        <asp:Label ID="Label_SurnameT" meta:resourcekey="lblSurname" runat="server" CssClass="label_title"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource26">
                        <asp:TextBox ID="Txt_Surname" runat="server" meta:resourcekey="Txt_SurnameResource1"
                            CssClass="txtBox_generics"></asp:TextBox>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource27">
                        <asp:Label ID="Label7" meta:resourcekey="lblPrivacyLevel" runat="server" CssClass="label_title privacyLabel"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource28">
                        <asp:DropDownList ID="DropDownListPrivacySurname" runat="server" CssClass="privacyLabel"
                            meta:resourcekey="DropDownListPrivacySurnameResource1">
                            <asp:ListItem Value="3" meta:resourcekey="dropDownListPrivacyAll">
                            </asp:ListItem>
                            <asp:ListItem Value="2" meta:resourcekey="dropDownListPrivacyTripBuddies"></asp:ListItem>
                            <asp:ListItem Value="1" meta:resourcekey="dropDownListPrivacyBuddies"></asp:ListItem>
                            <asp:ListItem Value="0" meta:resourcekey="dropDownListPrivacyNobody"></asp:ListItem>
                        </asp:DropDownList>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow meta:resourcekey="TableRowResource8">
                    <asp:TableCell meta:resourcekey="TableCellResource29">
                        <asp:Label ID="Label_EmailT" meta:resourcekey="lblEmail" runat="server" CssClass="label_title"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource30">
                        <asp:TextBox ID="Txt_Email" runat="server" meta:resourcekey="Txt_EmailResource1"
                            CssClass="txtBox_generics"></asp:TextBox>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource31">
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource32">
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow meta:resourcekey="TableRowResource9">
                    <asp:TableCell meta:resourcekey="TableCellResource33">
                        <asp:Label ID="Label_PhoneNumberT" meta:resourcekey="lblPhoneNumber" runat="server"
                            CssClass="label_title"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource34">
                        <asp:TextBox ID="Txt_PhoneNumber" runat="server" meta:resourcekey="Txt_PhoneNumberResource1"
                            CssClass="txtBox_generics"></asp:TextBox>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource35">
                        <asp:Label ID="Label9" meta:resourcekey="lblPrivacyLevel" runat="server" CssClass="label_title privacyLabel"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource36">
                        <asp:DropDownList ID="DropDownListPrivacyPhoneNumber" runat="server" CssClass="privacyLabel"
                            meta:resourcekey="DropDownListPrivacyPhoneNumberResource1">
                            <asp:ListItem Value="3" meta:resourcekey="dropDownListPrivacyAll">
                            </asp:ListItem>
                            <asp:ListItem Value="2" meta:resourcekey="dropDownListPrivacyTripBuddies"></asp:ListItem>
                            <asp:ListItem Value="1" meta:resourcekey="dropDownListPrivacyBuddies"></asp:ListItem>
                            <asp:ListItem Value="0" meta:resourcekey="dropDownListPrivacyNobody"></asp:ListItem>
                        </asp:DropDownList>
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
            <asp:Table runat="server" Width="600px">
                <asp:TableRow>
                    <asp:TableCell meta:resourcekey="TableCellResource33">
                        <asp:Label ID="Label1" meta:resourcekey="lblVeichles" runat="server" CssClass="label_title"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell meta:resourcekey="TableCellResource34">
                        <asp:RadioButtonList ID="CheckBoxVehicles" runat="server" meta:resourcekey="CheckBoxVehiclesResource1"
                            RepeatDirection="Horizontal" RepeatLayout="Flow">
                            <asp:ListItem meta:resourcekey="VehicleCitycar">Utilitaria</asp:ListItem>
                            <asp:ListItem meta:resourcekey="VehicleSedan">Berlina</asp:ListItem>
                            <asp:ListItem meta:resourcekey="VehicleSportCar">Sportiva</asp:ListItem>
                            <asp:ListItem meta:resourcekey="VehicleSuv">SUV</asp:ListItem>
                            <asp:ListItem meta:resourcekey="VehicleMono">Monovolume</asp:ListItem>
                            <asp:ListItem meta:resourcekey="VehicleMoto">Moto</asp:ListItem>
                            <asp:ListItem meta:resourcekey="VehicleNone">No veichle</asp:ListItem>
                        </asp:RadioButtonList>
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
        </div>
        <br />
        <br />
    </div>
    <br />
    <asp:LinqDataSource ID="LinqDataSourceFriendsFromSN" runat="server" ContextTypeName="FriendsFromSNDataSource"
        Select="new (Nickname, Name, Surname)" TableName="Friends" OnSelecting="LinqDataSourceFriendsFromSN_Selecting">
    </asp:LinqDataSource>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="LinqDataSourceFriendsFromSN"
        DataKeyNames="Nickname" Visible="False" meta:resourcekey="GridView1Resource1">
        <Columns>
            <asp:TemplateField HeaderText="Select" meta:resourcekey="TemplateFieldResource1">
                <ItemTemplate>
                    <asp:CheckBox ID="chkSelect" runat="server" meta:resourcekey="chkSelectResource1" />
                </ItemTemplate>
                <HeaderTemplate>
                </HeaderTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Nickname" HeaderText="Nickname" ReadOnly="True" SortExpression="Nickname"
                meta:resourcekey="BoundFieldResource1" />
            <asp:BoundField DataField="Name" HeaderText="Name" ReadOnly="True" SortExpression="Name"
                meta:resourcekey="BoundFieldResource2" />
            <asp:BoundField DataField="Surname" HeaderText="Surname" ReadOnly="True" SortExpression="Surname"
                meta:resourcekey="BoundFieldResource3" />
        </Columns>
        <EmptyDataTemplate>
            <asp:Label ID="Label10" runat="server" CssClass="label_title" Text="Nessun amico trovato"></asp:Label>
        </EmptyDataTemplate>
    </asp:GridView>
    <br />
    <asp:Button ID="ButtonAddFriends" runat="server" Text="Aggiungi tra gli amici" OnClick="Button2_Click"
        Visible="false" />
    <br />
    <div id="btns">
        <asp:LinkButton ID="l_btn_ImportDati_facebook" runat="server" meta:resourcekey="l_btn_ImportDati_facebook"
            OnClick="Btn_ImportDataFromSN_Click"></asp:LinkButton>
        <br />
        <asp:LinkButton ID="l_btn_ImportAmici_facebook" runat="server" meta:resourcekey="l_btn_ImportAmici_facebook"
            OnClick="l_btn_ImportAmici_facebook_Click"></asp:LinkButton>
        <br />
        <br />
        <asp:HyperLink ID="changePasswordPage" CssClass="label_title" Text="Change your Password"
            NavigateUrl="~/secure/changePassword.aspx" meta:resourcekey="changePasswordResource"
            runat="server"></asp:HyperLink>
        &nbsp;|
        <asp:HyperLink ID="deleteAccountPage" CssClass="label_title" Text="Delete your TripLOA account"
            NavigateUrl="~/secure/deleteAccount.aspx" runat="server" meta:resourcekey="deleteAccountRes"></asp:HyperLink>
        <br />
        <br />
        <br />
        <asp:Button ID="Btn_Confirm" meta:resourcekey="btnConfirm" runat="server" OnClick="Btn_Confirm_Click" />
        <asp:LinkButton ID="Btn_Cancel" runat="server" PostBackUrl="~/secure/userProfile.aspx"
            meta:resourcekey="Btn_CancelResource1">
            <asp:Button ID="Button1" runat="server" meta:resourcekey="btnCancel" /></asp:LinkButton>
        <br />
    </div>
    <!--</div>-->
</asp:Content>
